<?php

namespace app\common\lib;

class Connet{
	private $fds = [];
	private static $_instance = null;

	final private function __construct(){
	}
	private function __clone(){
	}

	public static function getInstance(){
		if (!(self::$_instance instanceof self)){
			self::$_instance = new self();
		}
		return self::$_instance;
	}

	public function add($fd){
		$this->fds[$fd] = $fd;
	}

	public function del($fd){
		if (!empty($this->fds[$fd])) {
			unset($this->fds[$fd]);
		}
	}
	public function getFds(){
		return $this->fds;
	}

}